import service from '@/utils/request'
export const getEmployeeList = (params) => {
  return service.get('/sys/user', { params })
}

export const exportExcelApi = () => {
  return service.get('/sys/user/export', { responseType: 'blob' })
}

export const importExcelApi = () => {
  return service.get('/sys/user/import/template', { responseType: 'blob' })
}

export const uploadExcelApi = (data) => {
  return service.post('/sys/user/import', data)
}

export const deleteExcelApi = (id) => {
  return service.delete(`/sys/user/${id}`)
}

export const addEmployeeApi = (data) => {
  return service.post(`/sys/user`, data)
}

export const getEmployeeApi = (id) => {
  return service.get(`/sys/user/${id}`)
}

export const putEmployeeApi = (data) => {
  return service.put(`/sys/user/${data.id}`, data)
}
